package models
{
	import models.vos.*;
	
	public class XMLResultParser
	{
		public function XMLResultParser()
		{
		}
		public function parseContacts(xmlcontacts:XML):Array{
			var contacts:Array = new Array();
			for each ( var xmlCont:XML in xmlcontacts..contact ){
				var contact:Contact = new Contact();
				
				contact.name 		= xmlCont.name;
				contact.email 		= xmlCont.email;
				contact.phone 		= xmlCont.phone;
				//contact.id 			= (Number) (xmlCont.id);
				//contact.supervisor 	= (Number) (xmlCont.supervisor);
				contact.id 			= (xmlCont.id);
				contact.supervisor 	= (xmlCont.supervisor);
							
				contacts.push( contact );
			}
			return contacts;
		}
	}
}